package Auxiliary;

use strict;
require Exporter;
our @ISA       = qw(Exporter);
our @EXPORT_OK = qw(
	test_tmpl
); 
our %EXPORT_TAGS = ();

use HTML::Template;
use Template;
use Template::Convert::HTML 'convert';

sub test_tmpl {
	my ($text, $args) = @_;
	my $output;
	my $tt = Template->new;
	$tt->process(\$text, $args, \$output) ||
		die $tt->error();
	$text = convert $text; 
	my $tmpl = HTML::Template->new(scalarref => \$text);
	$tmpl->param($args);
	return [$tmpl->output(),$output];
}

1;
